{template Public:Page:header}

<link rel="stylesheet" type="text/css" href="/assets/css/pay_logo.css"/>

<div class="container">
  <div class="row"> 
  {template Member:Index:sidebar}
    <div class="col-lg-10 well-col-pl-30">
      <div class="row">
        <div class="well">
          <h3>充值</h3>
          
         <div style="margin-left:2px;">
              <ul id="PayTab" class="nav nav-tabs tabs-flat">
                <li class="active">
                    <a href="/member/payin/index">
                        支付宝
                    </a>
                </li>
                <li>
                    <a href="/member/payin/tenpay">
                       财付通
                    </a>
                </li>
                <li>
                    <a href="/member/payin/list">
                        充值记录
                    </a>
                </li>
            </ul>
         </div>
        
        <div class="tab-content tabs-flat"><div class="tab-pane in active">

          <div class="row" id="BankList">
          
          	<div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box1 icon-box-set">
                    <input type="radio" name="alipay_bank" id="bank-alipay-1" value="ICBCB2C" >
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box2 icon-box-set">
                    <input type="radio" name="alipay_bank" id="bank-alipay-2" value="CMB-DEBIT" >
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
              <!-- 中国招商银行B2B -->
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box2-CMBBTB icon-box-set">
                    <input type="radio" name="alipay_bank" value="CMBBTB" id="bank-alipay-CMBBTB" >
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
      
              <!-- 中国建设银行 -->
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box3 icon-box-set">
                    <input type="radio" name="alipay_bank" value="CCB-DEBIT" id="bank-alipay-3" >
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             
             <!-- 中国建设银行B2B -->
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box3-CCBBTB icon-box-set">
                    <input type="radio" name="alipay_bank" value="CCBBTB" id="bank-alipay-CCBBTB" >
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box4 icon-box-set">
                    <input type="radio" name="alipay_bank" value="ABC" id="bank-alipay-4" >
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <!-- 中国农业银行B2B -->
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box4-ABCBTB icon-box-set">
                    <input type="radio" name="alipay_bank" value="ABCBTB" id="bank-alipay-ABCBTB">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
     		<!-- 中国银行 -->
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box5 icon-box-set">
                    <input type="radio" name="alipay_bank" value="BOCB2C" id="bank-alipay-5">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
          
            <!-- 中国银行B2B -->
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box5-BOCBTB icon-box-set">
                    <input type="radio" name="alipay_bank" value="BOCBTB" id="bank-alipay-BOCBTB">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box6 icon-box-set">
                    <input type="radio" name="alipay_bank" value="POSTGC" id="bank-alipay-6">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box7 icon-box-set">
                    <input type="radio" name="alipay_bank" value="SPDB" id="bank-alipay-7">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
			 <!-- SPDB银行B2B -->	             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box7-SPDBB2B icon-box-set">
                    <input type="radio" name="alipay_bank" value="SPDBB2B" id="bank-alipay-SPDBB2B">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
            <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box8 icon-box-set">
                    <input type="radio" name="alipay_bank" value="GDB" id="bank-alipay-8">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <!-- 光大银行 -->
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box9 icon-box-set">
                    <input type="radio" name="alipay_bank" value="CEBBANK" id="bank-alipay-9">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box10 icon-box-set">
                    <input type="radio" name="alipay_bank" value="CMBC" id="bank-alipay-10">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box11 icon-box-set">
                    <input type="radio" name="alipay_bank" value="CITIC" id="bank-alipay-11">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box12 icon-box-set">
                    <input type="radio" name="alipay_bank" value="CIB" id="bank-alipay-12">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
              <!-- 平安银行 -->
            <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box13 icon-box-set">
                    <input type="radio" name="alipay_bank" value="SPABANK" id="bank-alipay-13">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
            <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box15 icon-box-set">
                    <input type="radio" name="alipay_bank" value="COMM-DEBIT" id="bank-alipay-15">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box16 icon-box-set">
                    <input type="radio" name="alipay_bank" value="BJBANK" id="bank-alipay-16">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
            <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-box18 icon-box-set">
                    <input type="radio" name="alipay_bank" value="NBBANK" id="bank-alipay-18">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
           <div class="col-xs-6 col-md-3"><div class="radio">
                <label class="icon-alipay icon-box-set">
                    <input name="alipay_bank" type="radio" id="bank-alipay-21" value="" checked="checked">
                    <span class="text icon-box-radio"></span>
                </label>
             </div></div>
             
             
             </div></div>

          </div>
          
          
          <br />
          <form id="PayForm" action="/post/consume/payin" method="post">
           <div class="row">
          <div class="col-lg-2">
          <h4>充值金额(元)</h4>
          </div>
           <div class="col-lg-3">
           <input type="text" name="money" id="PayMoney" class="form-control" value="{if $_GET['pay']}{echo floatval($_GET['pay'])}{else}{echo C('pay_small_money')}{/if}" maxLength="12" size="14"/>
            </div>
             <div class="col-lg-2">
              <button class="btn btn-azure" type="submit" onclick="return CheckPay();">确定充值</button>
              <input name="bank" type="hidden" value="" />
              <input name="type" type="hidden" value="1" />
             </div>
            
            
		  </div>
          </form>
          
          <br />
          
          <br />
 


          
        </div>
      </div>
    </div>
  </div>
</div>

<script src="{echo AURL}/js/validation/bootstrapValidator.js"></script>

<script type="text/javascript">
function CheckPay(){
	  var paymoney=$("#PayMoney").val();
	 
	  if (isNaN(paymoney)){
		  alert("您输入的金额格式错误，请重新输入!");
		  $("#PayMoney").focus();
		  return false;
	  }	
	  
	 var paysmall=parseInt({echo C("pay_small_money")});
	
	 if(paysmall > parseInt(paymoney)){
		 alert("充值金额不能小于 "+paysmall+" 元!");
		 $("#PayMoney").focus();
		 return false; 
	 }
	 
	 var alipay_bank=$('#BankList input[name="alipay_bank"]:checked').val();
	 
	 $('input[name="bank"]').val(alipay_bank);
 
	 return true; 
}
$(function(){ 
	$('#PayForm').bootstrapValidator({
		excluded: [':disabled'],
		feedbackIcons: {
			valid: 'glyphicon glyphicon-ok',
			invalid: 'glyphicon glyphicon-remove',
			validating: 'glyphicon glyphicon-refresh'
		},
		fields: {
			money: {
				validators: {
					notEmpty: {
						message: '金额不能为空！'
					},
					regexp: {
						regexp: /^[0-9]+$/,
						message: '金额格式有误！'
					}
				}
			}
			
		}
	}) 			
	 
});	
</script>

{template Public:Page:footer}